package Dict;

/**
 * Enum definition: PropGroupeValue.
 *
 * @author OpenORB Compiler
*/
public final class PropGroupeValue implements org.omg.CORBA.portable.IDLEntity
{
    /**
     * Enum member G1 value 
     */
    public static final int _G1 = 0;

    /**
     * Enum member G1
     */
    public static final PropGroupeValue G1 = new PropGroupeValue(_G1);

    /**
     * Enum member G2 value 
     */
    public static final int _G2 = 1;

    /**
     * Enum member G2
     */
    public static final PropGroupeValue G2 = new PropGroupeValue(_G2);

    /**
     * Enum member G3 value 
     */
    public static final int _G3 = 2;

    /**
     * Enum member G3
     */
    public static final PropGroupeValue G3 = new PropGroupeValue(_G3);

    /**
     * Internal member value 
     */
    private final int _PropGroupeValue_value;

    /**
     * Private constructor
     * @param  the enum value for this new member
     */
    private PropGroupeValue( final int value )
    {
        _PropGroupeValue_value = value;
    }

    /**
     * Maintains singleton property for serialized enums.
     * Issue 4271: IDL/Java issue, Mapping for IDL enum.
     */
    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
        return from_int( value() );
    }

    /**
     * Return the internal member value
     * @return the member value
     */
    public int value()
    {
        return _PropGroupeValue_value;
    }

    /**
     * Return a enum member from its value.
     * @param value An enum value
     * @return An enum member
         */
    public static PropGroupeValue from_int( int value )
    {
        switch ( value )
        {
        case 0:
            return G1;
        case 1:
            return G2;
        case 2:
            return G3;
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

    /**
     * Return a string representation
     * @return a string representation of the enumeration
     */
    public java.lang.String toString()
    {
        switch ( _PropGroupeValue_value )
        {
        case 0:
            return "G1";
        case 1:
            return "G2";
        case 2:
            return "G3";
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

}
